﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RayDen.RayEngine;

namespace RayDen.SceneLab.Controllers
{
    public class ApplicationConfig : Singleton<ApplicationConfig>
    {
        public GlobalConfiguration RayEngineConfiguration;
        public NameValueCollection AppSettings
        {
            get { return ConfigurationManager.AppSettings; }
        }

        public ApplicationConfig()
        {
            Directory.SetCurrentDirectory(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
            GlobalConfiguration.Instance.OpenConfig(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Global.Config.xml");
            RayEngineConfiguration = GlobalConfiguration.Instance;
        }
    }
}
